#include "InputManager.h"


InputManager::InputManager()
{
}

InputManager::~InputManager()
{
}


void InputManager::BeginNewFrame()
{
    m_pressedKeys.clear();
    m_releasedKeys.clear();
}

void InputManager::PressKey(sf::Keyboard::Key key)
{
    m_pressedKeys[key] = true;
    m_heldKeys[key] = true;
}

void InputManager::ReleaseKey(sf::Keyboard::Key key)
{
    m_releasedKeys[key] = true;
    m_heldKeys[key] = false;
}

bool InputManager::IsKeyPressed(sf::Keyboard::Key key)
{
    return m_pressedKeys[key];
}

bool InputManager::IsKeyReleased(sf::Keyboard::Key key)
{
    return m_releasedKeys[key];
}

bool InputManager::IsKeyHeld(sf::Keyboard::Key key)
{
    return m_heldKeys[key];
}
